package com.zonski.jbots.game;

import java.util.Random;

/**
 * Constants for JBots
 */
public final class JBotsConstants
{
    public static final Random RANDOM = new Random();

    public static final int MAX_CHARGE = 300;

    /**
     * Constant for robot use 
     */
    public static final String BOT_HOLDING = "RightHand";

    public static final int MIN_OBSTACLE = 0;
    public static final int MAX_OBSTACLE = 3;
    public static final int MIN_BOT      = 4;
    public static final int MAX_BOT      = 9;

    // known entity types
    /**
     * An obstacle
     */
    public static final String ROCK     = "Rock";
    public static final int ROCK_ID     = 0;

    /**
     * A destructable obstacle
     */
    public static final String TEMP_ROCK = "TempRock";
    public static final int TEMP_ROCK_ID = 1;

    /**
     * Tree (destructable)
     */
    public static final String TREE = "TreeRock";
    public static final int TREE_ROCK_ID = 2;

    /**
     * A large obstacle
     */
    public static final String EDGE     = "EdgeRock";
    public static final int EDGE_ID     = 3;

    /**
     * The main entity in the game
     */
    public static final String BOT      = "Bot";
    public static final int BOT_ID      = 4;

    /**
     * A robot that blows up on things
     */
    public static final String BOMB_BOT = "BombBot";
    public static final int BOMB_BOT_ID = 5;

    /**
     * A turret that shoots at stuff
     */
    public static final String TURRET_BOT = "TurretBot";
    public static final int TURRET_BOT_ID = 6;

    /**
     * A tank, tries to shoot at you
     */
    public static final String TANK_BOT = "TankBot";
    public static final int TANK_BOT_ID = 7;

    /**
     * A converter bot
     */
    public static final String CONVERTER_BOT = "ConverterBot";
    public static final int CONVERTER_BOT_ID = 8;

    /**
     * A little copy of me
     */
    public static final String BABY_BOT = "BabyBot";
    public static final int BABY_BOT_ID = 9;

    /**
     * A recharge station for robots
     */
    public static final String RECHARGE = "Recharge";
    public static final int RECHARGE_ID = 10;

    /**
     * A fire ball
     */
    public static final String COMET    = "Comet";
    public static final int COMET_ID    = 11;

    /**
     * BOOOOM
     */
    public static final String EXPLOSION= "Explosion";
    public static final int EXPLOSION_ID= 12;

    /**
     * Small exploding device
     */
    public static final String BOMB     = "Bomb";
    public static final int BOMB_ID     = 13;

    /**
     * an egg
     */
    public static final String EGG      = "Egg";
    public static final int EGG_ID      = 14;


    /**
     * A power charge
     */
    public static final String CHARGE = "Charge";
    public static final int CHARGE_ID = 15;

    /**
     * A capacity extender
     */
    public static final String CAPACITY = "Capacity";
    public static final int CAPACITY_ID = 16;

    /**
     * A gun
     */
    public static final String GUN = "LaserGun";

    /**
     * A laser beam
     */
    public static final String LASER = "Laser";
    public static final int LASER_ID = 17;

    /**
     * pain
     */
    public static final String PAIN = "Pain";
    public static final int PAIN_ID = 18;


    public static final boolean isBot(int typeId)
    {
        return typeId >= MIN_BOT && typeId <= MAX_BOT;
    }

    public static final boolean isObstacle(int typeId)
    {
        return typeId >= MIN_OBSTACLE && typeId <= MAX_OBSTACLE;
    }

    private JBotsConstants()
    {
    }
}
